package com.hzncc.flowable_diboot.service;

import com.diboot.core.vo.JsonResult;
import com.dingtalk.api.request.OapiCheckinRecordGetRequest;
import com.dingtalk.api.response.OapiCheckinRecordGetResponse;
import com.hzncc.flowable_diboot.entity.DingDingGroup;
import com.taobao.api.ApiException;

import java.util.List;
import java.util.Map;

public interface DingtalkService {

    /**
     * 获取token
     *
     * @return
     * @author 陈广煜
     * @date 2024/6/12
     */
    JsonResult<String> getToken(String tenantId) throws Exception;
    JsonResult<String> getToken() throws Exception;


    /**
     * 获取签到数据
     *
     * @return
     * @author 陈广煜
     * @date 2024/6/12
     */
    JsonResult<List<OapiCheckinRecordGetResponse.CheckinRecordVo>> getCheckInData(String token, OapiCheckinRecordGetRequest req) throws ApiException;

    JsonResult<?> createChat(String token,DingDingGroup group, List<String> users) throws Exception;

    JsonResult<String> sendRobotMessage(String token,String openConversationId,String message) throws Exception;

    JsonResult<String> uploadFile(String token, String filePath,String fileType) throws Exception;

    JsonResult<String> sendRobotMessage(String token,String openConversationId, String message,String type) throws Exception;

    JsonResult<String> createTemplateChat(String token,DingDingGroup group) throws Exception;

    String getUserInfoByCode(String dingAuthToken,String tenantCode) throws ApiException;

    JsonResult<String> sendTemplateRobotMessage(String data, String openConversationId, String s,String type);

    JsonResult<String> sendWorkNotice(String token, String userId, Map<String, Object> param) throws Exception;
}
